import { request } from "../utils/request";

const api = {
  buyProduct: '/wx/order/users/buy',
  getOrderByState: '/wx/order/getinfo/byid',
  updateOrderState: '/wx/order/update'
}
// 主页获取全部商品信息
export const usersBuyProduct = (params) => {
  return request({
    url: api.buyProduct,
    method: 'POST',
    data: params
  })
}

export const getOrderByState = (params) => {
  return request({
    url: api.getOrderByState,
    method: 'GET',
    data: params
  })
}

export const updateOrderState = (params) => {
  return request({
    url: api.updateOrderState,
    method: 'POST',
    data: params
  })
}